<template>
  <div>
    <p>{{ count }}</p>
    <button v-on:click="count += 1">按钮</button>
    <button @click="add">按钮</button>
    <button @click="add3(5)">按钮</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      count: 0,
    };
  },
  methods: {
    add() {
      this.count++;
    },
    add3(n){
        this.count=this.count+n
    }
  },
};
</script>

<style>
</style>